From: Ian Campbell Date: Tue, 30 Apr 2013 07:08:08 +0000 (+0200) Subject: xsm: fix printf format string for strlen result X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6947 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=b3f685edb7b8d040182b9e4d83bf34f2883cc385;p=xen.git xsm: fix printf format string for strlen result strlen returns size_t: policydb.c: In function ‘policydb_read’: policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’ This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit Xen 4.2.x. I expect it affects ARM too. Reported-by: Dharshini Tharmaraj Signed-off-by: Ian Campbell Acked-by: Daniel De Graaf --- diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c index fefcd59171..bdec4ac264 100644 --- a/xen/xsm/flask/ss/policydb.c +++ b/xen/xsm/flask/ss/policydb.c @@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp) if ( len != strlen(POLICYDB_STRING) ) { printk(KERN_ERR "Flask: policydb string length %d does not " - "match expected length %lu\n", + "match expected length %zu\n", len, strlen(POLICYDB_STRING)); goto bad; }